Chapter 7 - View-Related Objects
This chapter describes view-related objects--view ports, view devices, and view groups--and the functions you can use to manipulate them. Read this chapter to learn how to draw any of the QuickDraw GX shapes you create, and how to control the representations of those shapes on any output devices.Before reading this chapter, you should be familiar with the information in the chapter "Introduction to QuickDraw GX" in this book. You should also be familiar with shape objects, as discussed in the chapter "Shape Objects" in this book, and transform objects, as discussed in the chapter "Transform Objects." Additional information related to color drawing is found in the chapter "Color and Color-Related Objects."
This chapter constitutes the complete discussion of view-related objects for QuickDraw GX. Unlike for shape objects and style objects, there is no additional discussion of view ports, view devices, or view groups for graphic or typographic shapes in other books. The book Inside Macintosh: QuickDraw GX Environment and Utilities does, however, discuss drawing to Macintosh windows and how to relate a view port to a window. It also discusses matrix manipulation, which you can use to change the mapping property of a view port or view device.
This chapter introduces view ports, view devices, and view groups, discusses their properties, and shows how they are related to each other. It then discusses the different coordinate spaces you use to manipulate these objects. It then shows how to use QuickDraw GX functions to
- use view ports: create and manipulate them; manipulate their properties, including clip, mapping, dither, halftone, and parent and child view ports; and analyze a shape in a view port
- use view devices: create and manipulate them; manipulate their properties, including clip and mapping; and analyze a shape on a view device
- use view groups: create and manipulate them; set them up for offscreen drawing; and analyze a shape in a view group
Chapter Contents
- About View Ports, View Devices, and View Groups
- About View Port Objects
- View Port Properties
- View Port Clip and Mapping
- Dither
- Dithering of Shapes Other Than Bitmaps
- Dithering of Bitmaps
- Drawbacks of Dithering
- Halftone
- Parent and Child View Ports
- View Port Attributes
- The Default View Port Object
- View Port Objects and Windows
- About View Device Objects
- View Device Properties
- View Device Clip and Mapping
- View Device Bitmap
- View Device Attributes
- The Default View Device Object
- View Device Objects and Physical Devices
- About View Group Objects
- View Groups Have No Properties
- Onscreen and Offscreen View Groups
- About Drawing, Coordinate Conversion, and Clipping
- QuickDraw GX Coordinates
- Geometry Space
- Local Space
- Global Space
- Device Space
- Using View-Related Objects
- Using View Ports
- Creating and Manipulating View Port Objects
- Manipulating View Port Object Properties
- Getting and Setting a View Port's Dither, Halftone, and Attributes
- Getting and Setting a View Port's View Group
- Getting and Setting a View Port's Tag References
- Getting and Setting a View Port's Clip and Mapping
- Setting Up the View Port Hierarchy for a Window
- Supporting Scrolling in a Window
- Identifying a View Port's View Devices
- Identifying a Shape's View Ports
- Measuring a Shape in Local Space
- Using View Devices
- Creating and Manipulating View Device Objects
- Manipulating View Device Object Properties
- Getting and Setting a View Device's Bitmap
- Getting and Setting a View Device's View Group
- Getting and Setting a View Device's Attributes and Tag References
- Getting and Setting a View Device's Clip and Mapping
- Identifying a Shape's View Devices
- Measuring a Shape in Device Space
- Hit-Testing a Shape on a Device
- Using View Groups
- Creating and Manipulating View Group Objects
- Setting Up an Offscreen View Group
- Measuring a Shape in Global Space
- View-Related Objects Reference
- Constants and Data Types
- The View Port Object
- The Halftone Structure
- Dot Types
- Tint Types
- View Port Attributes
- The View Device Object
- View Device Attributes
- The View Group Object
- View Group Types
- View Port Functions
- Creating and Manipulating View Port Objects
- Manipulating View Port Object Properties
- Retrieving the View Devices That Intersect a View Port
- Retrieving the View Ports That Intersect a Shape
- Measuring a Shape in Local Coordinates
- View Device Functions
- Creating and Manipulating View Device Objects
- Manipulating View Device Object Properties
- Retrieving the View Devices That Intersect a Shape
- Measuring a Shape in Device Coordinates
- Measuring the Colors and Pattern Width of a Shape on a Device
- Hit-Testing a Shape on a Device
- View Group Functions
- Creating and Disposing of View Group Objects
- Getting the View Ports and View Devices of a View Group
- Measuring a Shape in Global Coordinates
- Summary of View-Related Objects
- Constants and Data Types
- The View Port Object
- The Halftone Structure
- Dot Types
- Tint Types
- View Port Attributes
- The View Device Object
- View Device Attributes
- The View Group Object
- View Group Types
- View Port Functions
- Creating and Manipulating View Port Objects
- Manipulating View Port Object Properties
- Retrieving the View Devices That Intersect a View Port
- Retrieving the View Ports That Intersect a Shape
- Measuring a Shape in Local Coordinates
- View Device Functions
- Creating and Manipulating View Device Objects
- Manipulating View Device Object Properties
- Retrieving the View Devices That Intersect a Shape
- Measuring a Shape in Device Coordinates
- Measuring the Colors and Pattern Width of a Shape on a Device
- Hit-Testing a Shape on a Device
- View Group Functions
- Creating and Disposing of View Group Objects
- Getting the View Ports and View Devices of a View Group
- Measuring a Shape in Global Space